<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var Fn = function () {
            console.log('你好');
        }
        Fn.prototype.sayHi = function () {
            console.log('我说Hello');
        }
        // 函数即是函数也是对象
        console.dir(Fn);
        var cc = new Fn();
        cc.sayHi();
        // 函数即是函数也是对象
    </script>
</body>
</html>